﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="P_Quotation.aspx.cs" MasterPageFile="~/Popup.Master"
    Inherits="SAP.P_Quotation" %>

<%--<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>--%>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
   <%-- <script type="text/javascript" src="../../js/jquery-1.4.3.min.js"></script>
    <script type="text/javascript" src="../../js/main.js"></script>--%>
   
    <script type="text/javascript">
        
        function PopupPrint() {
            <%Session["DocumentType"] = "QT"; %> 
            //var url = "rptViewer.aspx?type=" + type + "&GeneralID=" + document.getElementById('hf_GeneralID').value;
            var url = "rptViewer.aspx?type=QT&GeneralID=" + document.getElementById('hf_GeneralID').value;
            window.open(url, '_self');
        };

    </script>
    <div>
    <%-- <link href="../../skin/skin.css" rel="stylesheet" type="text/css" />--%>
        <asp:UpdatePanel ID="editItemUpdatePanel" runat="server" UpdateMode="Conditional"
            ChildrenAsTriggers="True">
            <ContentTemplate>
                <table border="0" width="100%" style="background-color: #C9DBF2;">
                    <tr>
                        <td class="FormLineItemAlt">
                            QUOTATION:
                        </td>
                    </tr>
                </table>
                <table border="0" width="100%">
                    <tr>
                        <td style="width: 50%">

                            <table border="0" width="100%" style="background-color: #C9DBF2;">
                                <tr>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        VIN
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 35%">
                                        <asp:TextBox ID="txt_VIN" runat="server" Width="90%" Enabled="False"></asp:TextBox>
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 15%">
                                        Customer Name
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 35%">
                                        <asp:TextBox ID="txt_CusName" runat="server" Width="90%" Enabled="False"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="FormLineItemAlt" style="width: 15%">
                                        Brand
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 35%">
                                        <asp:TextBox ID="txt_Brand" runat="server" Width="90%" Enabled="False"></asp:TextBox>
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 15%">
                                        Other Name
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 35%">
                                        <asp:TextBox ID="txt_OtherName" runat="server" Width="90%" Enabled="False"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="FormLineItemAlt" style="width: 15%">
                                        Vehicle Name
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 35%">
                                        <asp:TextBox ID="txt_VehicleName" runat="server" Width="90%" Enabled="False"></asp:TextBox>
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 15%">
                                        Address
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 35%">
                                        <asp:TextBox ID="txt_Address" runat="server" Width="90%" Enabled="False"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="FormLineItemAlt" style="width: 15%">
                                        Engine No.
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 35%">
                                        <asp:TextBox ID="txt_EngineNo" runat="server" Width="90%" Enabled="False"></asp:TextBox>
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 15%">
                                        Tax Code
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 35%">
                                        <asp:TextBox ID="txt_TaxCode" runat="server" Width="90%" Enabled="False"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="FormLineItemAlt" style="width: 15%">
                                        Reg. No.
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 35%">
                                        <asp:TextBox ID="txt_RegNo" runat="server" Width="90%" Enabled="False"></asp:TextBox>
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 15%">
                                        Tel
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 35%">
                                        <asp:TextBox ID="txt_Tel" runat="server" Width="90%" Enabled="False"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="FormLineItemAlt" style="width: 15%">
                                        Key No.
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 35%">
                                        <asp:TextBox ID="txt_KeyNo" runat="server" Width="90%" Enabled="False"></asp:TextBox>
                                    </td>
                                    <td class="FormLineItemAlt" class="FormLineItemAlt" style="width: 15%">
                                        Mobile
                                    </td>
                                    <td class="FormLineItemAlt" class="FormLineItemAlt" style="width: 35%">
                                        <asp:TextBox ID="txt_Mobile" runat="server" Width="90%" Enabled="False"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="FormLineItemAlt" style="width: 15%">
                                        Model Code
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 35%">
                                        <asp:TextBox ID="txt_Model" runat="server" Width="90%" Enabled="False"></asp:TextBox>
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 15%">
                                        Contact Person
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 35%">
                                        <asp:TextBox ID="txt_ContactPerson" runat="server" ClientIDMode="Static" Width="50%"
                                            Enabled="False"></asp:TextBox>
                                        <asp:TextBox ID="txt_PhoneContact" runat="server" ClientIDMode="Static" Width="40%"
                                            Enabled="False"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="width: 15%" class="FormLineItemAlt">
                                        Notice
                                    </td>
                                    <td style="width: 35%" class="FormLineItemAlt">
                                        <asp:TextBox ID="txt_Notice" runat="server" Height="53px" TextMode="MultiLine" Width="90%"
                                            Enabled="False"></asp:TextBox>
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 15%">
                                        &nbsp;
                                    </td>
                                    <td class="FormLineItemAlt" style="width: 35%">
                                        <asp:HiddenField ID="hf_GeneralID" runat="server" ClientIDMode="Static" />
                                    </td>
                                </tr>
                            </table>

                        </td>
                    </tr>
                </table>
                <table border="0" width="100%">
                    <tr>
                        <td class="FormLineItemAlt">
                            Date:
                        </td>
                        <td class="FormLineItemAlt">
                            <asp:TextBox ID="txtDate" runat="server" Enabled="False"></asp:TextBox>
                        </td>
                        <td class="FormLineItemAlt">
                            Quotation No:
                        </td>
                        <td class="FormLineItemAlt">
                            <asp:TextBox ID="txt_QuotationNo" runat="server" Enabled="False"></asp:TextBox>
                        </td>
                        <td class="FormLineItemAlt">
                            Odometer:
                        </td>
                        <td class="FormLineItemAlt">
                            <asp:TextBox ID="txt_Odometer" runat="server" Enabled="False"></asp:TextBox>
                        </td>
                        <td class="FormLineItemAlt">
                            Payment:
                        </td>
                        <td class="FormLineItemAlt">
                            <asp:TextBox ID="txt_Payment" runat="server" Enabled="False"></asp:TextBox>
                        </td>
                    </tr>
                </table>
                <table border="0" width="100%">
                    <tr>
                        <td>
                            <asp:Button ID="btn_Cancel" runat="server" BackColor="#1B7FC2" ForeColor="#FFFFFF"
                                Height="30px" OnClientClick="return Main.cancelDialogClick()" Text="Cancel" Width="90px" />
                            <asp:Button ID="btn_Save" runat="server" BackColor="#1B7FC2" ForeColor="#FFFFFF"
                                Height="30px" OnClick="btn_Save_Click" Text="Save" Width="90px" />
                            <asp:CheckBox ID="chk_PartNBR" runat="server" Checked="True" Text="Part Number" />
                            <asp:Button ID="btn_Print" runat="server" BackColor="#1B7FC2" ForeColor="#FFFFFF"
                                Height="30px" Text="Print" Width="90px" OnClientClick="PopupPrint();" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lb_Message" runat="server" Text="PARTS" Font-Bold="True"></asp:Label>
                            :
                        </td>
                    </tr>
                </table>
                <%--CellPadding="2"--%>
                <table border="0" width="100%" style="background-color: #D1D4D8;">
                    <asp:GridView ID="grvPO" CssClass="GridInner" runat="server" Width="100%" BorderColor="White"
                        BackColor="White" AllowSorting="True" AutoGenerateColumns="False" HeaderStyle-Height="27px"
                        CellSpacing="2" HeaderStyle-VerticalAlign="Middle" AllowPaging="True" PageSize="20">
                        <PagerSettings Mode="NumericFirstLast" />
                        <PagerStyle BackColor="#70A0D0" Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                        <RowStyle BackColor="#D9E0ED" BorderColor="White" BorderWidth="2px" Height="25px" />
                        <AlternatingRowStyle BackColor="#EEF1F7" BorderColor="White" BorderWidth="2px" />
                        <Columns>
                            <asp:TemplateField HeaderText="#">
                                <ItemStyle HorizontalAlign="Center" Width="20px" />
                                <HeaderStyle VerticalAlign="Middle" />
                                <ItemTemplate>
                                    <asp:Label ID="lblNo" runat="server" Text='<%# Eval("RowNum") %>'>
                                    </asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Selected">
                                <ItemStyle HorizontalAlign="Center" Width="50px" />
                                <HeaderStyle VerticalAlign="Middle" />
                                <ItemTemplate>
                                    <asp:CheckBox ID="chk_Selected" runat="server" Checked='<%# Eval("IsSelected") %>' />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Part NBR">
                                <ItemStyle HorizontalAlign="Left" Width="100px" />
                                <HeaderStyle VerticalAlign="Middle" Font-Bold="true" />
                                <ItemTemplate>
                                    <asp:Label ID="lblItemCode" runat="server" Text='<%#  Eval("ItemCode")%>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Part Name">
                                <ItemStyle HorizontalAlign="Left" Width="250px" />
                                <HeaderStyle VerticalAlign="Middle" Font-Bold="true" />
                                <ItemTemplate>
                                    <asp:Label ID="lblItemName" runat="server" Text='<%# Eval("ItemName") %>' BorderStyle="none" />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="VN Name">
                                <HeaderStyle VerticalAlign="Middle" />
                                <ItemStyle HorizontalAlign="Left" Width="250px" />
                                <ItemTemplate>
                                    <asp:Label ID="lbFrgnName" runat="server" Text='<%# Eval("FrgnName") %>' BorderStyle="none" />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Quantity">
                                <HeaderStyle VerticalAlign="Middle" />
                                <ItemStyle HorizontalAlign="Right" Width="50px" />
                                <ItemTemplate>
                                    <asp:Label ID="txtQty" runat="server" Width="97%" Text='<%# String.Format("{0:N}", Eval("Quantity")) %>'
                                        Style="text-align: right" />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Price">
                                <HeaderStyle VerticalAlign="Middle" />
                                <ItemStyle HorizontalAlign="Right" Width="70px" />
                                <ItemTemplate>
                                    <asp:Label ID="lbPrice" runat="server" Text='<%# String.Format("{0:N}", Eval("Price")) %>' BorderStyle="none" />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="VAT">
                                <ItemStyle HorizontalAlign="Right" />
                                <HeaderStyle VerticalAlign="Middle" Width="70px" />
                                <ItemTemplate>
                                    <asp:Label ID="lbVat" runat="server" Text='<%# String.Format("{0:N}", Eval("VAT")) %>' BorderStyle="none" />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Discount">
                                <ItemStyle HorizontalAlign="Right" />
                                <HeaderStyle VerticalAlign="Middle" Width="70px" />
                                <ItemTemplate>
                                    <asp:Label ID="txtDiscount" Width="100%" Style="text-align: right;" runat="server"
                                        Text='<%#String.Format("{0:N}", Eval("DiscPrcnt")) %>' />
                                </ItemTemplate>
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Stock">
                                <ItemStyle HorizontalAlign="Right" />
                                <HeaderStyle VerticalAlign="Middle" Width="50px" />
                                <ItemTemplate>
                                    <asp:Label ID="lbStock" runat="server" Text='<%# String.Format("{0:N}", Eval("Stock")) %>' BorderStyle="none" />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="DetCode">
                                <ItemStyle HorizontalAlign="Right" />
                                <HeaderStyle VerticalAlign="Middle" Width="10px" />
                                <ItemTemplate>
                                    <asp:Label ID="lbDetailCode" runat="server" Text='<%# Eval("DetailCode") %>' BorderStyle="none" />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <HeaderStyle BackColor="#6095C9" Font-Bold="true" ForeColor="#ffffff" Font-Overline="False"
                            Height="27px" VerticalAlign="Bottom" />
                    </asp:GridView>
                </table>

                <table width="100%" border="0">
                    <tr>
                        <td class="FormLineItemAlt" align="right">
                            <table width="300px">
                                <tr>
                                    <td class="FormLineItemAlt" style="width: 50%; font-weight: bold; color: #3366AA;">
                                        Sub Total:
                                    </td>
                                    <td class="FormLineItemAlt" align="right" style="width: 50%; font-weight: bold; color: #3366AA;">
                                        <asp:Label ID="lb_SubTotal" runat="server" Text="0"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="FormLineItemAlt" style="width: 50%; font-weight: bold; color: #3366AA;">
                                        VAT Amount:
                                    </td>
                                    <td class="FormLineItemAlt" align="right" style="width: 50%; font-weight: bold; color: #3366AA;">
                                        <asp:Label ID="lb_VATAmount" runat="server" Text="0"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="FormLineItemAlt" style="width: 50%; font-weight: bold; color: #3366AA;">
                                        Discount Amount:
                                    </td>
                                    <td class="FormLineItemAlt" align="right" style="width: 50%; font-weight: bold; color: #3366AA;">
                                        <asp:Label ID="lb_DiscountAmt" runat="server" Text="0"></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="FormLineItemAlt" style="width: 50%; font-weight: bold; color: #3366AA;">
                                        Grand Total:
                                    </td>
                                    <td class="FormLineItemAlt" align="right" style="width: 50%; font-weight: bold; color: #3366AA;">
                                        <asp:Label ID="lb_GrandTotal" runat="server" Text="0"></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
                <%--
            <div ID="action-form">
               <asp:ImageButton ID="btnAdd" runat="server" 
                    ImageUrl="~/skin/images/SAP_choose.png" OnClick="btnAdd_Click" />
                <asp:ImageButton ID="btnCancel" runat="server" 
                    ImageUrl="~/skin/images/SAP_cancel.png" 
                    OnClientClick="return Main.cancelDialogClick()" />
            </div>--%>
            </ContentTemplate>
            <Triggers>
                <%-- <asp:PostBackTrigger  ControlID="btnFilter" />--%>
                <%--  <asp:PostBackTrigger  ControlID="txtFilter" />--%>
            </Triggers>
        </asp:UpdatePanel>
    </div>
</asp:Content>
